/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 供应商档案Entity
 * @author HOHD
 * @version 2020-12-09
 */
@Table(name="st_supplier_bank", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="bank_name", attrName="bankName", label="银行", queryType=QueryType.LIKE),
		@Column(name="account_name", attrName="accountName", label="户名", queryType=QueryType.LIKE),
		@Column(name="bank_no", attrName="bankNo", label="银行账号"),
		@Column(name="default_bank", attrName="defaultBank", label="默认银行账号"),
		@Column(name="supplier_id", attrName="supplierId.id", label="供应商id"),
	}, orderBy="a.id ASC"
)
public class StSupplierBank extends DataEntity<StSupplierBank> {
	
	private static final long serialVersionUID = 1L;
	private String bankName;		// 银行
	private String accountName;		// 户名
	private String bankNo;		// 银行账号
	private Integer defaultBank;		// 默认银行账号
	private StSupplierRecord supplierId;		// 供应商id 父类
	
	public StSupplierBank() {
		this(null);
	}


	public StSupplierBank(StSupplierRecord supplierId){
		this.supplierId = supplierId;
	}
	
	@Length(min=0, max=20, message="银行长度不能超过 20 个字符")
	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	
	@Length(min=0, max=20, message="户名长度不能超过 20 个字符")
	public String getAccountName() {
		return accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}
	
	@Length(min=0, max=20, message="银行账号长度不能超过 20 个字符")
	public String getBankNo() {
		return bankNo;
	}

	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}
	
	public Integer getDefaultBank() {
		return defaultBank;
	}

	public void setDefaultBank(Integer defaultBank) {
		this.defaultBank = defaultBank;
	}
	
	@Length(min=0, max=36, message="供应商id长度不能超过 36 个字符")
	public StSupplierRecord getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(StSupplierRecord supplierId) {
		this.supplierId = supplierId;
	}
	
}